package com.xinqi.modules.file.mq;

import com.xinqi.common.core.enums.RocketMqEnum;
import com.xinqi.modules.file.mq.consumer.OssSliceConsumerListener;
import lombok.RequiredArgsConstructor;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
@RequiredArgsConstructor
public class MqConsumerRunner implements CommandLineRunner {

    private final OssSliceConsumerListener ossSliceConsumerListener;

    @Override
    public void run(String... args) throws Exception {
        // 启动消息OSS监听
        ossSliceConsumerListener.pushConsumerMsg(RocketMqEnum.SLICE);
    }

}
